import { Component } from '@angular/core';
import { NavController, NavParams,ViewController,ModalController,PopoverController } from 'ionic-angular';
import { ProjectDetailPage } from'../project-detail/project-detail'
import { ListPopoverPage } from'./list-popover'
import { SearchPage } from'../search/search'
import { ProjectEditPage } from'../project-edit/project-edit'

@Component({
  selector: 'page-project-list',
  templateUrl: 'project-list.html',
})
export class ProjectListPage {
  segment:string="未开始"
  constructor(public navCtrl: NavController, public navParams: NavParams,public viewCtrl: ViewController,public modalCtrl: ModalController,public popoverCtrl: PopoverController) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad ProjectDetail');
  }
 dismiss(){
  this.viewCtrl.dismiss()
}
presentDetailhModal() {
    let modal = this.modalCtrl.create(ProjectDetailPage);
    modal.present();
  }
   presentPopover(myEvent) {
    let popover = this.popoverCtrl.create(ListPopoverPage);
    popover.present({
      ev: myEvent
    });
  }
    presentSearchModal(){
     let modal = this.modalCtrl.create(SearchPage);
    modal.present();
  }
  presentModal() {
    let modal = this.modalCtrl.create(ProjectEditPage);
    modal.present();
  }
}
